#include"process.h"
#include<unistd.h>
#include<cstdio>
void program(int num)
{
    int bar=1000;
    int cur=0;
    while(cur<=1000)
    {
        usleep(50000);
        int rate=(cur*100)/bar;
       processbar(rate);
        cur+=num;
    }
    cout<<endl;
}
int main()
{
    program(10);
    program(20);
    program(50);
   //bin int count=10;
   // while(count)
   // {
   //     printf("%-2d\r",count--);
   //     fflush(stdout);
   //     sleep(1);
   // }
   // cout<<"linux is great tool";
   // fflush(stdout);
   // sleep(2);
    return 0;
}
